This specification relates to compiling source code and compiler caches.
A compiler is a computer program that converts source code files written in a programming language into an output having a target language. The target language is often machine-readable code that can be executed by a processor.
Compiling source code files is often a time-consuming process. In large build systems, time spent compiling source code often has a non-trivial impact on the throughput of the system.
A compilation cache improves compile times by maintaining information about compilation targets that have already been compiled. If the compilation cache indicates that a particular compilation target has already been generated, a build system does not need to recompile the files used to generate the compilation target. In the usual case, if the files upon which a compilation target depends have not changed since the compilation target was cached, the compilation target will have a cache hit. Conversely, if any of the files upon which a compilation target depends have been modified since the compilation target was cached the compilation target will have a cache miss, and the system will recompile the compilation target. File modifications that result in a cache miss include changes to the source code within a file as well as files being moved or renamed within a file system.
In addition, other build system events can also result in a cache miss for a particular compilation target. Some compilation caches also consider the dependency search path when determining whether there is a cache hit or miss for a particular compilation target. The dependency search path specifies in which order particular file system directories will be checked to find dependencies for a compilation target. If the dependency search path has changed for a particular compilation target, the system will have a cache miss.